package com.example.serverSide.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.serverSide.pojo.OrderDetail;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
    @Select("SELECT SUM(p.price*od.amount) FROM order_detail od, product p WHERE od.product_id = p.id")
    Double getAllPrize();
}
